#pragma once

#include <vector>
#include <string>

#include "Font.h"
#include "../SGD Wrappers/CSGD_TextureManager.h"

class BitmapFont
{
	std::vector<Font> fonts;

	static BitmapFont* pInstance;

	// Constructor
	BitmapFont(void);

	// Destructor
	~BitmapFont(void);
public:
	static BitmapFont* GetInstance( void );
	static void DeleteInstance( void );

	int GetTextLength(const char* text, unsigned int fontIndex);
	int GetTextLength(std::string text, unsigned int fontIndex);
	int GetTextHeight(const char* text, unsigned int fontIndex);
	int GetTextHeight(std::string text, unsigned int fontIndex);

	int LoadFont(std::string filename); // Xml file; returns the index for the font
	void Print(std::string Text, float PosX, float PosY, int index, DWORD dwColor = D3DCOLOR_ARGB(255,255,255,255), float scale = 1.0f);
	void Print(std::string Text, float PosX, float PosY, int index,int width,  DWORD dwColor = D3DCOLOR_ARGB(255,255,255,255), float scale = 1.0f);

	void UnloadAll(void);
};

